Best viewed in Notepad with Word Wrap

Program:  ZCopy v0.1
Size:   266 bytes
Category:  TI-83/84+ Assembly Misc. Programs
Purpose:  No-stub assembly utility
Author:  Andree Chea
E-mail:  kryptic_89@yahoo.com

/*********************************************************************/

This program will copy any program, BASIC or assembly, archived or unarchived, into a temporary program for ease of execution.  Useful if you have several archived programs that need to be conditionally ran at the fastest speed possible.  To install, send the following program:

ZCOPY.8xp

Usage
====================
To use this, place the program to be copied in Ans and run this program.  E.g. to copy "prgmTEST"

PROGRAM:MAIN
:"TEST
:Asm(prgmZCOPY

It will be copied to prgmZTEMP, unless an error occured.

Error Codes
====================
This program returns error-codes in case a fault occured.  Ans contains the code after the call:

0 - Success
1 - Program is undefined
2 - Not used
3 - Ans contains an invalid name
4 - Ans is not a string
5 - Not enough memory to copy

These errors should give a general idea of the situation if something goes wrong.  However, some cases might not be reported correctly, such as error #3, so don't absolutely depend on them.  But if it wasn't successful, then it is safe to assume that the program wasn't copied :)

If it was successful, the program will now be copied to an edit-protected program, "prgmZTEMP".  Simply run ZTEMP to execute it.

Example
====================
Here is one case where this program might be useful.  Assume "Z1" through "Z6" are archived, and you want to run "Z1" if X=1; "Z2" if X=2; etc.  So, in unoptimized format:

PROGRAM:GAME
:If X=1:"Z1
:If X=2:"Z2
:If X=3:"Z3
:If X=4:"Z4
:If X=5:"Z5
:If X=6:"Z6
:Asm(prgmZCOPY
:0->G
:While G!=45
:prgmZTEMP
:getKey->G
:End

But after optimization:

PROGRAM:GAME
:sub("Z1Z2Z3Z4Z5Z6",2X-1,2
:Asm(prgmZCOPY
:Repeat G=45
:prgmZTEMP
:getKey->G
:End

If you just want to be able to run archived BASIC programs directly from the archive, then I recommend using Flash Gordon, findable at the Omnimaga website: http://omnimaga.earthforge.com.

Disclaimer
====================
By running this program, you agree to not hold me responsible for any damage that this program may cause.

Please do not distribute a modified source.

Bugs
====================
-If Ans is not uppercase or digits, it may crash
-If program to be copied is "ZTEMP" it WILL crash, for logical reasons
-If program to be copied is currently being ran, it may crash

Version History
====================
20050311	Version 0.1
-First Public Release

Future Versions
====================
-Bug fix(es)
-Have copied program self-delete when the BASIC program exits
-Have another string as input to copy the program to, instead of a fixed temporary program
-Add program manipulation (delete, archive, etc.)

Credits
====================
Bram Tant (a.k.a the_unknown_one) - For attempting to code this program, and inspiration
Kvin Ouellet - For the idea, and asking Bram Tant to code this

Contact
====================
Any questions, comments, problems, criticisms? PLEASE send them all to:
kryptic_89@yahoo.com

(2*b)||!(2*b); that = theQuestion;
Thank you for downloading!